﻿using Nop.Web.Framework;
using System;
using System.Collections.Generic;

namespace Logistics.Web.Models.Track
{
    public class CourierCommissionModel
    {
        public CourierCommissionModel()
        {
            CourierId = 0;  // valid values should be > 0
        }

        private IList<CourierCommissionPlanModel> _plans;

        [NopResourceDisplayName("Admin.Logistics.Courier")]
        public int CourierId { get; set; }
        public string CourierName { get; set; }
        public string CourierEmail { get; set; }

        public DateTime StartDate;
        public DateTime EndDate;

        public decimal TotalCommission { get; set; }

        public virtual IList<CourierCommissionPlanModel> Plans
        {
            get { return _plans ?? (_plans = new List<CourierCommissionPlanModel>()); }
            protected set { _plans = value; }
        }
    }

    public class CourierCommissionPlanModel
    {
        public int PlanId;
        public decimal CourierCommission;
    }
}
